#ifndef GRAPHICS_VERTEXARRAY_H
#define GRAPHICS_VERTEXARRAY_H

#include <core/core.h>
#include <math/math.h>
#include <core/object.h>
#include <core/ref.h>

class QGLShaderProgram;


namespace yam3d
{
namespace graphics
{

    class VertexArrayImpl;

    class VertexArray : public core::Object
    {
    public:
        VertexArray( const core::vector<math::vec4>& data );
        VertexArray( const core::vector<math::vec3>& data );
        VertexArray( const core::vector<math::vec2>& data );
        VertexArray( const core::vector<float>& data );

        virtual ~VertexArray();

        void setAttributeArray(QGLShaderProgram* program, const char* const name, int stride = 0);

        void getData( core::vector<math::vec3> *data ) const;
    private:
        core::Ref<VertexArrayImpl> m_impl;

        VertexArray();
        VertexArray(const VertexArray&);
        VertexArray& operator=(const VertexArray&);
    };

}
}

#endif // GRAPHICS_VERTEXARRAY_H
